package com.pai4j.remote.act;


import com.pai4j.common.bean.PAIResponseBean;
import com.pai4j.domain.vo.request.request.act.ResourceBehaviorRequestVO;
import com.pai4j.domain.vo.response.UserBaseResponseInfoVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Map;

@FeignClient(name = "pai4j-act-service", contextId = "resourceBehaviorClient")
public interface IResourceBehaviorClient {


    /**
     * 资源基础互动操作
     *
     * @param resourceBehaviorRequest
     * @return
     */
    @PostMapping("/act-service/resource/behavior")
    PAIResponseBean<Long> behavior(@RequestBody ResourceBehaviorRequestVO resourceBehaviorRequest);

    /**
     * 取消资源基础互动操作
     *
     * @param resourceBehaviorRequest
     * @return
     */
    @PostMapping("/act-service/resource/behavior/cancel")
    PAIResponseBean<Long> cancelBehavior(@RequestBody ResourceBehaviorRequestVO resourceBehaviorRequest);
    
    /**
     *  判断用户是否已对资源进行互动操作
     *
     * @author: CYM-pai
     * @date: 2025/07/31 09:35
     **/
    @PostMapping("/act-service/resource/behavior/isBehavior")
    PAIResponseBean<Boolean> isBehavior(@RequestBody ResourceBehaviorRequestVO resourceBehaviorRequest);
    
    /**
     *  统计资源基础互动操作的数量
     *
     * @author: CYM-pai
     * @date: 2025/07/31 09:35
     **/
    @PostMapping("/act-service/resource/behavior/countBehavior")
    PAIResponseBean<Long> countBehavior(@RequestBody ResourceBehaviorRequestVO resourceBehaviorRequest);


    /**
     *  获取资源基础互动操作的用户信息
     *
     * @author: CYM-pai
     * @date: 2025/07/31 09:35
     **/
    @PostMapping("/act-service/resource/behavior/resourceBehavior")
    PAIResponseBean<Map<String, UserBaseResponseInfoVO>> resourceBehaviorUsersCache(@RequestBody ResourceBehaviorRequestVO resourceBehaviorRequest);
}
